Optimal. Leaf size=77 \[ \frac {2 f \tan ^{-1}\left (\frac {a \tan \left (\frac {1}{2} (c+d x)\right )+b}{\sqrt {a^2-b^2}}\right )}{b d^2 \sqrt {a^2-b^2}}-\frac {e+f x}{b d (a+b \sin (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {4422, 2660, 618, 204} \[ \frac {2 f \tan ^{-1}\left (\frac {a \tan \left (\frac {1}{2} (c+d x)\right )+b}{\sqrt {a^2-b^2}}\right )}{b d^2 \sqrt {a^2-b^2}}-\frac {e+f x}{b d (a+b \sin (c+d x))} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 618
Rule 2660
Rule 4422
Rubi steps
\begin {align*} \int \frac {(e+f x) \cos (c+d x)}{(a+b \sin (c+d x))^2} \, dx &=-\frac {e+f x}{b d (a+b \sin (c+d x))}+\frac {f \int \frac {1}{a+b \sin (c+d x)} \, dx}{b d}\\ &=-\frac {e+f x}{b d (a+b \sin (c+d x))}+\frac {(2 f) \operatorname {Subst}\left (\int \frac {1}{a+2 b x+a x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{b d^2}\\ &=-\frac {e+f x}{b d (a+b \sin (c+d x))}-\frac {(4 f) \operatorname {Subst}\left (\int \frac {1}{-4 \left (a^2-b^2\right )-x^2} \, dx,x,2 b+2 a \tan \left (\frac {1}{2} (c+d x)\right )\right )}{b d^2}\\ &=\frac {2 f \tan ^{-1}\left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}-\frac {e+f x}{b d (a+b \sin (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.44, size = 73, normalized size = 0.95 \[ \frac {\frac {2 f \tan ^{-1}\left (\frac {a \tan \left (\frac {1}{2} (c+d x)\right )+b}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-\frac {d (e+f x)}{a+b \sin (c+d x)}}{b d^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.49, size = 339, normalized size = 4.40 \[ \left [-\frac {2 \, {\left (a^{2} - b^{2}\right )} d f x + 2 \, {\left (a^{2} - b^{2}\right )} d e + {\left (b f \sin \left (d x + c\right ) + a f\right )} \sqrt {-a^{2} + b^{2}} \log \left (\frac {{\left (2 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2} + 2 \, {\left (a \cos \left (d x + c\right ) \sin \left (d x + c\right ) + b \cos \left (d x + c\right )\right )} \sqrt {-a^{2} + b^{2}}}{b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2}}\right )}{2 \, {\left ({\left (a^{2} b^{2} - b^{4}\right )} d^{2} \sin \left (d x + c\right ) + {\left (a^{3} b - a b^{3}\right )} d^{2}\right )}}, -\frac {{\left (a^{2} - b^{2}\right )} d f x + {\left (a^{2} - b^{2}\right )} d e + {\left (b f \sin \left (d x + c\right ) + a f\right )} \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \sin \left (d x + c\right ) + b}{\sqrt {a^{2} - b^{2}} \cos \left (d x + c\right )}\right )}{{\left (a^{2} b^{2} - b^{4}\right )} d^{2} \sin \left (d x + c\right ) + {\left (a^{3} b - a b^{3}\right )} d^{2}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (f x + e\right )} \cos \left (d x + c\right )}{{\left (b \sin \left (d x + c\right ) + a\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 1.52, size = 194, normalized size = 2.52 \[ -\frac {2 i \left (f x +e \right ) {\mathrm e}^{i \left (d x +c \right )}}{b d \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}-b +2 i a \,{\mathrm e}^{i \left (d x +c \right )}\right )}-\frac {f \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a \sqrt {-a^{2}+b^{2}}-a^{2}+b^{2}}{\sqrt {-a^{2}+b^{2}}\, b}\right )}{\sqrt {-a^{2}+b^{2}}\, d^{2} b}+\frac {f \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a \sqrt {-a^{2}+b^{2}}+a^{2}-b^{2}}{\sqrt {-a^{2}+b^{2}}\, b}\right )}{\sqrt {-a^{2}+b^{2}}\, d^{2} b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F(-1)] time = 0.00, size = -1, normalized size = -0.01 \[ \text {Hanged} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________